APPNAME = SMS
OBJDIR = `pwd`/../
APPPATH = ${OBJDIR}bin/${APPNAME}
CC = gcc
CFLAGS += -I ${OBJDIR}inc/
#LIBPATH = ${OBJDIR}lib/
#LDFLAGS += -L ${LIBPATH} -lsqlite3 -lmosquitto  -ldl -lpthread


server:create_file
	${CC} `pwd`/*.c -o ${APPPATH}   ${CFLAGS} 
	
create_file:
	$(shell if [ ! -d $(OBJDIR)bin ]; then mkdir -p $(OBJDIR)bin; fi)
	
	$(shell if [ ! -d $(OBJDIR)logger ]; then mkdir -p $(OBJDIR)logger; fi)


.PHONY:distclean
distclean:
	rm -rf ${OBJDIR}bin
	rm -rf ${OBJDIR}logger